_iiii_nnnn_iiii_tttt_ssss_cccc_rrrr is almost always the first routine that should be called (the
exceptions are _ssss_llll_kkkk______iiii_nnnn_iiii_tttt, _ffff_iiii_llll_tttt_eeee_rrrr, _rrrr_iiii_pppp_oooo_ffff_ffff_llll_iiii_nnnn_eeee, _uuuu_ssss_eeee______eeee_nnnn_vvvv and, for multiple-
terminal applications, _nnnn_eeee_wwww_tttt_eeee_rrrr_mmmm.) This determines the terminal type and
initializes all _cccc_uuuu_rrrr_ssss_eeee_ssss data structures. _iiii_nnnn_iiii_tttt_ssss_cccc_rrrr also causes the first
call to _rrrr_eeee_ffff_rrrr_eeee_ssss_hhhh to clear the screen. If errors occur, _iiii_nnnn_iiii_tttt_ssss_cccc_rrrr writes an
appropriate error message to standard error and exits; otherwise, a
pointer is returned to _ssss_tttt_dddd_ssss_cccc_rrrr. If the program needs an indication of
error conditions, _nnnn_eeee_wwww_tttt_eeee_rrrr_mmmm_((((_)))) should be used instead of _iiii_nnnn_iiii_tttt_ssss_cccc_rrrr; _iiii_nnnn_iiii_tttt_ssss_cccc_rrrr
should only be called once per application.
A program that outputs to more than one terminal should use the _nnnn_eeee_wwww_tttt_eeee_rrrr_mmmm
routine for each terminal instead of _iiii_nnnn_iiii_tttt_ssss_cccc_rrrr. A program that needs an
indication of error conditions, so it can continue to run in a line-
oriented mode if the terminal cannot support a screen-oriented program,
would also use this routine. The routine _nnnn_eeee_wwww_tttt_eeee_rrrr_mmmm should be called once
for each terminal. It returns a variable of type _SSSS_CCCC_RRRR_EEEE_EEEE_NNNN _**** which should
be saved as a reference to that terminal. The arguments are the _t_y_p_e of
the terminal to be used in place of _$$$$_TTTT_EEEE_RRRR_MMMM, a file pointer for output to
the terminal, and another file pointer for input from the terminal (if
_t_y_p_e is _NNNN_UUUU_LLLL_LLLL, _$$$$_TTTT_EEEE_RRRR_MMMM will be used). The program must also call _eeee_nnnn_dddd_wwww_iiii_nnnn for
each terminal being used before exiting from curses. If _nnnn_eeee_wwww_tttt_eeee_rrrr_mmmm is
called more than once for the same terminal, the first terminal referred
to must be the last one for which _eeee_nnnn_dddd_wwww_iiii_nnnn is called.
A program should always call _eeee_nnnn_dddd_wwww_iiii_nnnn before exiting or escaping from
_cccc_uuuu_rrrr_ssss_eeee_ssss mode temporarily. This routine restores tty modes, moves the
cursor to the lower left-hand corner of the screen and resets the
terminal into the proper non-visual mode. Calling _rrrr_eeee_ffff_rrrr_eeee_ssss_hhhh or _dddd_oooo_uuuu_pppp_dddd_aaaa_tttt_eeee
after a temporary escape causes the program to resume visual mode.
The _iiii_ssss_eeee_nnnn_dddd_wwww_iiii_nnnn routine returns _TTTT_RRRR_UUUU_EEEE if _eeee_nnnn_dddd_wwww_iiii_nnnn has been called without any
subsequent calls to _wwww_rrrr_eeee_ffff_rrrr_eeee_ssss_hhhh, and _FFFF_AAAA_LLLL_SSSS_EEEE otherwise.